﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AyFrame.DbEntity.ColumnAttributes;
using AyFrame.Common.Enums;
using SqlSugar;

namespace AyFrame.DbEntity.Models
{
    public class BaseEntity
    {
        [StringKey()]
        public string Id { get; set; } = Guid.NewGuid().ToString();

        public DateTime AddTime { get; set; } = DateTime.Now;

        [StringLength()]
        public string AddUid { get; set; }

        public DateTime UpdateTime { get; set; } = DateTime.Now;

        [StringLength()]
        public string UpdateUid { get; set; }

        [StringLength(20)]
        public string TimeStamp { get; set; } = DateTime.Now.ToString("yyyyMMddHHmmssfff");

        public RecordStatus Status { get; set; } = RecordStatus.Committed;
    }
}
